package com.android.model.login;


import com.android.bean.ResponseData;
import com.android.bean.User;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/*
"http://47.107.52.7:88/member/photo/user/login?password=123456&username=fangshicai"
 */
public interface longinHttp_Interface {
    //登录
    @POST("tran/user/login")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<User>> login(@Body User user);

    //获取验证码
    @GET("tran/user/send")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<String>> sendCode(@Query("phone") String phone);

    @POST("tran/user/register")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<String>> register(@Body User user);



}
